<% if view == "mobile" %>
  <% additional_classes = "d-lg-none" %>
<% elsif view == "desktop" %>
  <% additional_classes = "d-none d-lg-table-cell" %>
<% end %>

<div class="shopping-cart-item-price <%= additional_classes %>" data-hook="cart_item_price">
  <%= line_item.single_money.to_html %>
</div>
<div class="shopping-cart-item-quantity <%= additional_classes %>" data-hook="cart_item_quantity">
  <div class="d-flex align-items-center">
    <%= button_tag '-', type: 'button', class: "border-right-0 shopping-cart-item-quantity-decrease-btn", data: { id: dom_id(line_item) } %>
    <%= item_form.number_field :quantity, min: 0, class: "form-control text-center border-left-0 border-right-0 shopping-cart-item-quantity-input", size: 5, data: { id: dom_id(line_item) }, aria: { label: Spree.t('cart_page.change_quantity') } %>
    <%= button_tag '+', type: 'button', class: "border-left-0 shopping-cart-item-quantity-increase-btn", data: { id: dom_id(line_item) } %>
  </div>
</div>

<% if view == "desktop" %>
  <div class="shopping-cart-item-total d-none d-lg-table-cell" data-hook="cart_item_total">
    <%= line_item.display_amount.to_html unless line_item.quantity.nil? %>
  </div>
<% end %>

<div class="shopping-cart-item-delete <%= additional_classes %>" data-hook="cart_item_delete">
  <%= link_to '#', class: 'delete', id: "delete_#{dom_id(line_item)}", data: { turbolinks: false, id: dom_id(line_item), variant_sku: line_item.sku, variant_name: line_item.name, variant_price: line_item.price, variant_options: line_item.options_text }, aria: { label: Spree.t('cart_page.remove_from_cart') } do %>
    <%= icon(name: 'garbage',
             classes: 'shopping-cart-item-delete-icon',
             width: 18.9,
             height: 17) %>
  <% end %>
</div>
